import { request } from '@ruifox-cms/utils'

// 分页获取留言
export function selectCommentPage(params) {
    return request({
        url: '/station/api/comment/selectPage',
        method: 'get',
        params
    })
}
// 分页获取自己能查看的留言
export function selectSelfCommentPage(params) {
    return request({
        url: '/station/api/comment/selectSelf',
        method: 'get',
        params
    })
}
// 获取可查看的留言栏目
export function selectCommentSelfCategory(params) {
    return request({
        url: '/station/api/comment/selectSelfCategory',
        method: 'get',
        params
    })
}
// 已读
export function readComment(data) {
    return request({
        url: '/station/api/comment/read',
        method: 'post',
        data
    })
}

// 批量已读
export function readCommentBatch(data) {
    return request({
        url: '/station/api/comment/batchRead',
        method: 'post',
        data
    })
}

// 审核留言
export function auditComment(data) {
    return request({
        url: '/station/api/comment/audit',
        method: 'post',
        data
    })
}

// 批量审核
export function auditCommentBatch(data) {
    return request({
        url: '/station/api/comment/batchAudit',
        method: 'post',
        data
    })
}

// 添加留言
export function insertComment(data) {
    return request({
        url: '/station/api/comment/insert',
        method: 'post',
        data
    })
}

// 删除留言
export function deleteComment(data) {
    return request({
        url: '/station/api/comment/delete',
        method: 'post',
        data
    })
}

// 批量删除
export function deleteCommentBatch(data) {
    return request({
        url: '/station/api/comment/deleteList',
        method: 'post',
        data
    })
}

// 修改留言
export function updateComment(data) {
    return request({
        url: '/station/api/comment/update',
        method: 'post',
        data
    })
}

// 公开留言
export function openComment(data) {
    return request({
        url: '/station/api/comment/open',
        method: 'post',
        data
    })
}

// 批量共开留言
export function openCommentBatch(data) {
    return request({
        url: '/station/api/comment/batchOpen',
        method: 'post',
        data
    })
}

// 推荐留言
export function recommendComment(data) {
    return request({
        url: '/station/api/comment/recommend',
        method: 'post',
        data
    })
}

// 批量推荐
export function recommendCommentBatch(data) {
    return request({
        url: '/station/api/comment/batchRecommend',
        method: 'post',
        data
    })
}

// 获取留言详情
export function selectCommentById(params) {
    return request({
        url: '/station/api/comment/selectById',
        method: 'get',
        params
    })
}
